#include "mywidget.h"
#include <QPushButton>
#include "mybutton.h"

MyWidget::MyWidget(QWidget *parent)
    : QWidget(parent)
{
    resize(400, 300);
    move(0, 0);

    QPushButton *b1 = new QPushButton(this);
    b1->setText("按钮b1");
    b1->move(100, 100);
    b1->resize(100, 100);

    QPushButton *b2 = new QPushButton(b1);
    b2->setText("按钮b2");
    b2->move(20, 20);
    b2->resize(50, 30);

    MyButton *b3 = new MyButton(this);
    b3->setText("自定义按钮");
}

MyWidget::~MyWidget()
{

}
